$(function(){
	//页面加上查询条件
	showCondition(true);
	
	paramTabPage[tabId]= $("#tabContent > .tab-pane.active").data();
	var wardCode = paramTabPage[tabId].wardCode;
	var wardDesc = paramTabPage[tabId].wardDesc;
	$("#" + tabId + " #wardCode").val(wardCode);
	$("#" + tabId + " #wardDesc").val(wardDesc);
	$("#" + tabId + " #wardtarget").html('<i class="fa fa-file-text-o" ></i>' + wardDesc + "ADRG指标")
	$("#" + tabId + " #wardalltarget").html('<i class="fa fa-file-text-o" ></i>' + wardDesc + "MDC指标")
	
	getQuotas("wardDisAdrgMonitor_1", loadData_1, "wardadrghosp-ul");
	
	function loadData_1(totalQuota){
		/* 全院指标 (1.Hosp 2.All) 
		参数：1.查询类型2.查询全部 数据3.查询的指标以及页签名4.此部分所加载的div的id，3.div下面的ul*/
		loadWardAllQuota("mdc",totalQuota,"wardAdrgQuotasTopId","wardadrghosp-ul");	
		/*
		加载下面的的div
		参数：1.查询指标2.表格头部显示的名字3.布局所在的页面4。div下面的ul*/
		loadWardQuota(totalQuota,"ADRG","wardAdrgQuotasId","wardadrg-ul");		
		/*	为下半部分加载数据 
		参数：3.表格第一列加载链接4.表格操作中的链接*/
		loadWardQuotaData(totalQuota,"adrg","loadAdrgToDrgs","loadAdrgToWard");
	}
});


function loadAdrgToDrgs(code,desc){
	var param = jQuery.extend(true,{},paramTabPage[tabId]);
	param.adrgCode = code;
	openTab('/pages/ward/wardDisDrgMonitor.jsp', code+'|DRGs','adrgtodrgs'+code, 'adrgtodrgs'+code,param);

}
function loadAdrgToWard(code,desc){
	var param = jQuery.extend(true,{},paramTabPage[tabId]);
	param.adrgCode = code;
	openTab('/pages/ward/wardDisDepMonitor.jsp',code+'|病区','adrgtodep'+code,'adrgtodep'+code,param);

}